// 给定一个数组，找到出现奇数次的数字
function getArr(arr1) {
    var arr2 = [];
    for (let j = 0; j < arr1.length; j++) {
        if (arr2.indexOf(arr1[j]) == -1) {
            arr2.push(arr1[j])
        }
    }
    return arr2.forEach(function(value, index, array) {
        console.log(value);
    })
}
const findOdd = (arr) => {
    var newArr = []
    for (let i = 0; i < arr.length; i++) {

        var num = 0;
        n = arr.indexOf(arr[i]);
        while (n !== -1) {
            var n = arr.indexOf(arr[i], n + 1);
            num++;
        }
        if (num % 2 !== 0) {
            newArr.push(arr[i])
        }

    }
    console.log(getArr(newArr));
}
let arr = findOdd([1, 1, 1, 2, 3, 3, 5, 5])
let arr_1 = findOdd([2, 2, 3, 3, 3, 3, 1, 5, 5, 5])